<template>
	<view class="consult" v-if="user.username">
		<view class="consult-top">
			<text>卖家拒绝退款申请</text>
			<text>{{timeShijianall(list.ju_time*1000)}}</text>
		</view>
		<view class="consult-yy">
			拒绝原因：{{list.jutui_content}}
		</view>
		<view class="consult-shop">
			<view class="consult-shop-top">
				<view>
					<image :src="user.img" mode="aspectFill"></image>
				</view>
				<view>
					<view>{{user.username}}</view>
					<view>{{timeShijianall(list.tui_time*1000)}}</view>
				</view>
			</view>
			<view class="consult-shop-text">
				买家({{user.username}}）于{{timeShijianall(list.tui_time*1000)}}创建了退款申请
			</view>
			<view class="consult-shop-for">
				<view>退款方式</view>
				<text>原路返回</text>
			</view>
			<view class="consult-shop-for">
				<view>申请退款金额合计</view>
				<text>￥{{list.tui_price}}</text>
			</view>
			<view class="consult-shop-for">
				<view>退款原因</view>
				<text>{{list.tui_content }}</text>
			</view>
			<view class="consult-shop-for">
				<view>退款描述</view>
				<text>{{list.tui_desc}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:{},
				user:{},
			};
		},
		onLoad(e) {
			if (e.data) {
				this.init(e.data)
			}else{
				this.init(1)
			}
		},
		methods: {
			init(data) {
				this.$request("Order/FindOrder", {
					data: {
						id: data
					},
					isLoad: false
				}).then(res => {
					this.list = res.result
				})
				this.$request("User/index", {
					data: {
				
					},
					isLoad: false
				}).then(res => {
					this.user = res.result
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.consult {
		.consult-top {
			background-color: #fff;
			padding: 40rpx 32rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			text {
				font-size: 28rpx;
				color: #999999;
			}
		}

		.consult-yy {
			background-color: #fff;
			padding: 0 32rpx 64rpx 32rpx;
			color: #323233;
			font-size: 36rpx;
			font-weight: bold;
		}

		.consult-shop {
			margin-top: 20rpx;
			padding: 0 32rpx;
			background-color: #fff;

			.consult-shop-for {
				padding: 16rpx 0;
				display: flex;

				>view {
					font-size: 28rpx;
					color: #999999;
				}

				>text {
					margin-left: 20rpx;
					font-size: 28rpx;
					color: #333333;
					font-weight: bold;
				}
			}

			.consult-shop-text {
				padding: 16rpx 0;
				font-size: 28rpx;
				color: #333333;
			}

			.consult-shop-top {
				padding: 24rpx 0;
				display: flex;
				align-items: center;

				>view:first-child {
					image {
						width: 80rpx;
						height: 80rpx;
						border-radius: 16rpx;
					}
				}

				>view:last-child {
					margin-left: 20rpx;

					>view:first-child {
						font-size: 32rpx;
						color: #323233;
						font-weight: bold;
					}

					>view:last-child {
						margin-top: 16rpx;
						font-size: 24rpx;
						color: #999999;
					}
				}
			}
		}
	}
</style>
